home *** CD-ROM | disk | FTP | other *** search
/ New Star Software Collection / NSS_Collection.iso / 3-170 dbase 10 for windows / 1.ima / SAMPLES.PAK / IMAGE.PRG < prev    next >
Encoding:
Text File  |  1993-07-26  |  2.8 KB  |  85 lines

  1. *******************************************************************************
  2. *  PROGRAM:      Image.prg
  3. *
  4. *  WRITTEN BY:   Borland Late Night Crew
  5. *
  6. *  DATE:         5/93
  7. *
  8. *  UPDATED:      7/16/93
  9. *
  10. *  VERSION:      Alpha α
  11. *
  12. *  DESCRIPTION:  Image.prg shows Bladerunner's image and graph window controls,
  13. *                and how these and other controls can work together to reflect
  14. *                the current state of the open database.
  15. *                A pie graph object is defined, with each slice of the graph
  16. *                showing the GNP of a European country. An image object is
  17. *                defined below that, highlighting the country of choice
  18. *                highlighted on a map of Europe.  Double-clicking on a slice of
  19. *                the European pie moves the record pointer to the corresponding
  20. *                country, and updates the map image.  Two entryfields are also
  21. *                defined showing the current country's name and capitol.  The
  22. *                END pushbutton closes the window.
  23. *
  24. *  PARAMETERS:   None
  25. *
  26. *  CALLS:        None
  27. *
  28. *  USAGE:        DO Image
  29. *
  30. *
  31. *
  32. *******************************************************************************
  33. #define IROW 12   && starting point for defining the map image
  34. #define ICOL 3
  35.  
  36. private savearea
  37. savearea = str(workarea())
  38.  
  39. *** fonts
  40. define font ArialB          height 20 width 25 type "Arial" Bold
  41. define font ModernBI        height 15 width 10 type "Modern" Bold Italic
  42. define font TimesNewRomanB  height 20 width 12 type "Courier" Bold
  43. define font Modern          height 14 width 6 type "Arial"
  44.  
  45. use country in select()
  46. select country
  47.  
  48. define window Country of desktop from  1, 1 to 28,75;
  49.    title "European GNP";
  50.    color b/bg;
  51.    sizeable;
  52.    onclose Cleanup()
  53.  
  54. * Graph object defined on a file created using GRAPH FORM.
  55. * This is a pie graph of the GNP of European countries.
  56. define graph pieGraph of Country from 2,27 to 17,70 filename eurpie.grf
  57. define text messageText of Country at 17,30;
  58.    prompt "Double click on a pie slice to change the country.";
  59.    font Modern;
  60.    color bg/b
  61. define image mapImage of Country from IROW,ICOL to IROW+15 ,ICOL+26 memo map
  62. define entryfield  country->Name of Country at 7,ICOL;
  63.    font TimesNewRomanB;
  64.    color rb/bg
  65. define entryfield  country->Capital of Country at 9,ICOL;
  66.    font ModernBI;
  67.    color b/bg
  68. define pushbutton end of Country at IROW +8,ICOL+41 prompt "End";
  69.    font TimesNewRomanB;
  70.    color b/bg
  71.  
  72. on selection window Country close window Country
  73.  
  74. readmodal("country")
  75. Cleanup()
  76.  
  77. ***************************************************************************
  78. function Cleanup
  79. ***************************************************************************
  80. use
  81. select &savearea
  82. return .t.
  83.  
  84. ******************************** End of Image.prg *****************************
  85.